<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%
    request.setAttribute("contextPath", request.getContextPath());
%>
<html >
  <head>
    <meta charset="utf-8">
    <title>慧驾在线书城</title>
    <meta name="查看port" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <meta http-equiv="Refresh" content="2;${contextPath }/book1/${bookId}" />

<!-- Bootstrap style --> 
    <link id="callCss" rel="stylesheet" href="${contextPath }/themes/bootshop/bootstrap.min.css" media="screen"/>
    <link href="${contextPath }/themes/css/base.css" rel="stylesheet" media="screen"/>
<!-- Bootstrap style responsive -->	
	<link href="${contextPath }/themes/css/bootstrap-responsive.min.css" rel="stylesheet"/>
	<link href="${contextPath }/themes/css/font-awesome.css" rel="stylesheet" type="text/css">
<!-- Google-code-prettify -->	
	<link href="${contextPath }/themes/js/google-code-prettify/prettify.css" rel="stylesheet"/>
<!-- fav and touch icons -->
    <link rel="shortcut icon" href="${contextPath }/themes/images/ico/favicon.ico">
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="${contextPath }/themes/images/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="${contextPath }/themes/images/ico/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="${contextPath }/themes/images/ico/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="${contextPath }/themes/images/ico/apple-touch-icon-57-precomposed.png">
	<style type="text/css" id="enject"></style>
  </head>
<body>
<div id="header">
<div class="container">
<div id="welcomeLine" class="row">

<!-- 显示在右上角 显示登录用户名 -->
	<div class="span6">Welcome 
		<!-- change -->
		<c:if test="${not empty LOGIN_USER_KEY_IN_SESSION }">
		<b>${LOGIN_USER_KEY_IN_SESSION.userName }</b>
		</c:if>
	</div>

</div>
<!-- Navbar ================================================== -->
<div id="logoArea" class="navbar">
<a id="smallScreen" data-target="#topMenu" data-toggle="collapse" class="btn btn-navbar">
	<span class="icon-bar"></span>
	<span class="icon-bar"></span>
	<span class="icon-bar"></span>
</a>
  <div class="navbar-inner">
  
  <!-- 慧驾书城那个图片 -->
    <a class="brand" href="${contextPath }/index"><img src="${contextPath }/themes/images/logo.png" alt="Bootsshop"/></a>
    
    	<!-- 最上面      搜索栏   -->
	<form class="form-inline navbar-search" method="post" action="${contextPath }/search" >
		<input id="srchFld" class="srchTxt" type="text" name="bookName"/>
		  <select class="srchTxt" name="categoryId">
		  	<option value="0">全部读物</option>
			<c:forEach items="${category }" var="category">
				<option value="${category.categoryId }">${category.categoryName }</option>
			</c:forEach>
		</select> 
		  <button type="submit" id="submitButton" class="btn btn-primary">搜索</button>
    </form>
    
    
    
    <ul id="topMenu" class="nav pull-right">

	 <li class="">
	 
	 <!-- 搜索栏     登录按钮 -->
	 <c:if test="${empty LOGIN_USER_KEY_IN_SESSION }">
	 <a href="${contextPath }/gotoLogin" role="button" data-toggle="modal" style="padding-right:0"><span class="btn btn-large btn-success">登录</span></a>
	 </c:if>
	 <c:if test="${not empty LOGIN_USER_KEY_IN_SESSION }">
	 <table>
	 <c:if test="${userRole.roleName!='普通用户' }">
	 <input type="button" name="manage" value="管理员" onclick="location=('${contextPath }/admin')"/>
	 </c:if>
	 <input type="button" name="manage" value="退出" onclick="location=('${contextPath }/logout')"/>
	 </table>
	 </c:if>
	</li>
    </ul>
  </div>
</div>
</div>
</div>
<!-- Header End====================================================================== -->

<div id="mainBody">
	<div class="container">
	<div class="row">
<!-- Sidebar ================================================== -->
	<div id="sidebar" class="span3">

		<ul id="sideManu" class="nav nav-tabs nav-stacked">
		
			<!-- 左栏     显示所有书、特价书、类别等栏目 -->
			<li><a class="active" href="${contextPath }/showallbooks">所有图书</a></li>
			<li><a href="${contextPath }/showBookSpecials">特价图书</a></li>
			<li class="subMenu open"><a> 所有分类</a>

				<!-- 类别 -->
				<ul>
				<c:forEach items="${category }" var="category">
					<li><a href="${contextPath }/filter/${category.categoryId }"><option>${category.categoryName }</option></a></li>
				</c:forEach>
				</ul>
			</li>
		</ul>
		<br/>
	
		
	</div>
<!-- Sidebar end=============================================== -->
				<div class="span4">
					<h4>Success</h4>
					<div class="alert alert-success">
						<button type="button" class="close" data-dismiss="alert">&times;</button>
						<strong>Well done!</strong> 评论成功！
						<div>现在自动调整到书本详情首页，请耐心等待</div>
					</div>
				</div>
			</div>
</div>
<!-- Footer ================================================================== -->
	<div  id="footerSection">
	<div class="container">
	
		<p class="pull-right">&copy; 慧驾书城</p>
	</div><!-- Container End -->
	</div>
<!-- Placed at the end of the document so the pages load faster ============================================= -->
	<script src="${contextPath }/themes/js/jquery.js" type="text/javascript"></script>
	<script src="${contextPath }/themes/js/bootstrap.min.js" type="text/javascript"></script>
	<script src="${contextPath }/themes/js/google-code-prettify/prettify.js"></script>
	
	<script src="${contextPath }/themes/js/bootshop.js"></script>
    <script src="${contextPath }/themes/js/jquery.lightbox-0.5.js"></script>
	
<span id="themesBtn"></span>
</body>
</html>